feat(#4342) logfile view - chunk navigation#5390
Conversation
Add byte-range logfile chunk navigation for skipped content, with a compact follow/page up/page down toolbar that switches between live tailing and manual browsing. Also parse logfile window metadata, show skipped bytes for manual chunks, and add localized navigation labels.
replaced plain strings with Enum
Added previous/next chunk navigation Show skipped and remaining byte counts Render only complete log lines across chunk boundaries Automatically reset and resume follow mode after logfile compression Improved tail-follow scroll behavior and manual chunk navigation
|
Hi @cdprete, I created a new PR for issue #4342, as I realized my previous approach would not be sufficient to implement this feature cleanly. I think the previous PR(#5326) can be closed. Could you please review the new PR and let me know if any further changes are needed? It took longer than I initially expected because of the edge cases involved. |
|
Hi @vetri15. You can close the old PR yourself if you think the new one supersedes it.
I try to do it asap.
No worries. |
|
@SteKoe @erikpetzold @ulischulte @hzpz can you maybe allow the pipeline to run in the meantime so that we make sure there are no potential issues? Tnx |
|
Yeah, you were right @cdprete. I have closed the old PR. |
|
By the way, please be aware that there are issues with empty lines. |
|
Hi @cdprete, Thanks for pointing this out. I checked #5388 and updated this PR to handle empty log lines in the logfile view as well. Empty strings are now rendered as |
Hi @vetri15. I just wanted to inform you I updated the styles in my PR as follows:
|
…epending on the location of the scroll bar , requiring 2 clicks
… the followmode tick.
…ressed. Now, only 416 errors are suppressed, so other errors will be shown on screen.
|
Hi @cdprete , I have summarized the issues you mentioned before. have corrected most of them. need your input on the remaining ones.
|
|
Hi @vetri15.
I'll give it a new try as soon as I've some more time and I let you know.
I'm using the servlet sample which is already part of the project. Maybe it helps.
Yes and no. I mean, if "remaining" is not 0, you're now fetching it and rendering it.
I'll give it a new try as soon as I've some more time and I let you know. |
…ble full width at all times
|
Hi @vetri15. This (it's the latest version you committed, btw) maybe shows better what I meant with the styles getting broken: Also, I can still see 416 responses flooding the console: Video.Project.mp4The navigation seems to be worse now than in the previous version, in particular in the following flow:
See below: Recording.2026-05-26.200614.mp4Also, unless I've maybe too few logs, the navigation between chunks is not really possible. On page up, the full logs gets then rendered again, instead of just the previous chunk which makes me wonder what happens if the log file has GB of text in it. |
|
Hi @cdprete my bad, I missed that style missing. I have corrected that in my local repo. will push it once all issues are solved. I am working on the UI auto recovering on stop and start of a server. have decided to do a retry logic for a few seconds before resetting the page. so there will be no need of manual refresh. 416 spam error:
Thanks for the insight , I was able to pinpoint the cause of error. when appending new bytes if the request is on the edge of the byte range , it is causing the error. previously I was testing with a slightly higher frequency quartz job , so it went unnoticed. Regarding that, Manual file navigation rendering few lines , it was intentional based on the following discussion on the previous PR (#5326), #5326 (comment), If you prefer filling the table approach , let me know. However, that would make the code a bit more complex. |
|
Hi @vetri15.
I would because currently it looks quite awkward, especially considering that going one page back simply renders then everything. Also, will going back always render everything or will also work in chunks? |
|
Hi @cdprete No , going back would only render the previous 300KB of text. Suppose if there were |
|
Yeah, if possible, I would try to fill the table up.
The ideal implementation would be to show, on every page up/down, exactly
enough lines to fill the table but that don't render the vertical scrollbar.
But that would be too complex to implement. :)
Il mer 27 mag 2026, 06:54 vetri15 ***@***.***> ha scritto:
… *vetri15* left a comment (codecentric/spring-boot-admin#5390)
<#5390 (comment)>
Hi @cdprete <https://github.com/cdprete>
No , going back would only render the previous 300KB of text. Suppose if
there were
400KB of skipped bytes , then on first 'back' it would render 100-400
window , and on next back it would render 0-100. So technically while going
back to the start of the file would also result in few lines rendered on
the table. Should I also change this behaviour to fill the table?
—
Reply to this email directly, view it on GitHub
<#5390?email_source=notifications&email_token=ACAZGWHPF7RXO7IUQ5FOLXL44ZYIXA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINJVGE2DCOJSGMZKM4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4551419232>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACAZGWA4PDJLZ7D2KMW2ADT44ZYIXAVCNFSM6AAAAACZLAJ6V2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKNJRGQYTSMRTGI>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…le boundaries by snapping ranges to the start/end of the logfile.
|
Hi @cdprete , I have updated the PR and implemented fixes for the remaining bugs. For navigation near the start or end of the file, I am overlapping bytes to keep the table filled using the existing 300 KB chunk size. regarding the table not being filled near start and end: Rendering exactly the number of bytes needed to fill the table is difficult because wrapped lines take uneven vertical space. Zooming in or out also changes how many lines are needed to fill the visible table area. So keeping a fixed 300 KB chunk with boundary overlap is a more stable approach.
|
I know, that's why I said it would be ideal but I didn't request it.
I'll test it once more and make a video showing the issue if it still occurs. |
|
Hi @vetri15. I tested it again and I cannot reproduce anymore the issue with the scrollbar going at the bottom while using the pagination.
Why such a distinction? Are you sure it's really the case? Moreover, what's the interval between retries? Ideally it shouldn't be too short (e.g.: 1s or more, but not less). I would keep retrying forever only if the error is due to SBA server itself being down. @SteKoe, maybe you can provide more insights, but I wonder if we get different responses in the UI on the specific case of connection failure depending on the fact that the failure comes from SBA server itself or from the proxied/monitored application. Only one note: while it was trying to reconnect, I got from a short moment an error mentioning Moreover, while the reconnection logic is in progress, all the buttons apart the line wrap should be disabled. Also I just realized that now I've the opposite problem :D Video.Project.1.mp4Mmm I cannot really imagine a solution for this... unless to implement something driven on the number of remaining bytes on a best effort. Like, if it's more or less one full "page" then keep it to the top (as it is now, so that by scrolling manually you can read the content of the "page"), but if it's just some lines then scroll to the bottom. |
|
Hi @cdprete, Thanks for pointing out the button disabling issue , I have now disabled it. and updated the PR.
You are right, manual navigation can stay active after a server restart. Manual mode only fetches explicit ranges and updates the total size metadata, so I left it to recover without a full reset.
Yes, a short-lived 503 can happen during reconnect. The logfile request goes through SBA’s /instances/{id}/actuator/logfile proxy; if the instance is temporarily unavailable or not yet registered during restart, the proxy returns 503 Service Unavailable. Once the next retry succeeds, the error is cleared.
Yeah, looks like I fixed one side and created the mirror version of the problem :D like you said , the ideal behavior would be to scroll to the bottom only when page down adds just a few lines. But tracking that accurately may be tricky, since the number of visible lines depends on screen size, wrapping, and font rendering. I think we can skip that for now, unless you really think this should be handled in this PR. |
|
Hi @vetri15
Sure, but then let's go to the previous behaviour that the scrollbar goes to the bottom. |
|
Hi @cdprete , The manual navigation now scrolls to the bottom on navigation. |
Hi @vetri15. Can you please align with the master branch by resolving the conflicts so that I'll do a final test and then let the team handle this?
Would it be possible, eventually, during the manual navigation, to first scroll to the top/botton and, only when the button is pressed again, fetch the previous/next chunk? I think that in the previous PR I said I was against this idea, but from a UX prospective I find it way better than having to manually scroll on every page. Also, it's more aligned with the previous behaviour. |
|
Hi @cdprete,
Yes, definitely. It should be possible to first scroll to the top/bottom during manual navigation, and only fetch the previous/next chunk when the button is pressed again. I’ll work on this and update the PR. Clarification needed: since we have set scroll to bottom as default on manual navigation , when we traverse using page up , we would need to press two times for traversing up. but when traversing page down , we would only press one time for each traverse down as the loaded page will already be at bottom. there will not be symmetry between traversing up and down, is it fine ? I saw your comment only after merging master, so please ignore the previous merge. |
|
Hi @vetri15,
I don't follow. The 1st page down would move the scrollbar to the bottom and the 2nd would fetch the next chunk, if available.
??? |
|
Hi @cdprete ,
Yea , you are right. If the scroll bar is at the middle, whatever direction we click it will scroll to , and only on the second click, it will load the next/previous chunk. My doubt was when we are traversing a big file and we are on one of the middle chunks with scroll bar also in middle,
I was talking about this asymmetry ,for consequent traversal : one click for down but two click for traversing up. I cant think of a simple solution to this to behave symmetrically Hope it made sense |
|
Hi @vetri15,
I would say: first click scrolls up, second click loads the chunk and scrolls up, so that the view makes visible the chunk from the beginning
I would say: first click scrolls down, second click loads the chunk and scrolls up, so that the view makes visible the chunk from the beginning In a nutshell:
I'm not sure about the scroll up for visibility purposes, though. I would need to see the outcome of it.
This would be true only if you're already at the bottom and it's not really asymmetrical. It's just that when you're at the top you can't go further up. |
…d loading the corresponding chunk on next click.
…ue-4342-logile-view
|
Hi @cdprete ,
Implemented the requested change , can you please check and tell whether it is working as expected |








Implemented logfile chunk navigation and recovery improvements.